package com.wuze.cloud.enums;

import lombok.Getter;

/**
 * @Author wuze
 * @Date 2023/5/13 21:02
 * @ClassName: SysUserStateEnum
 * @Description: TODO
 */
public enum SysUserStateEnum {

    UN_CENCEL(0, "未注销"),
    CENCEL(1, "已注销"),
    ;

    @Getter
    private Integer code;

    @Getter
    private String name;

    SysUserStateEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String StateOfCode(Integer code) {
        for (SysUserStateEnum userStateEnum : values()) {
            if (userStateEnum.code.equals(code)) {
                return userStateEnum.name();
            }
        }
        return null;
    }

}
